package com.uyaer.engine.plug
{
	import com.uyaer.engine.Const;

	public class SkillTree
	{
		/**
		 *查找出招表 
		 * @param res
		 * @return 
		 * 
		 */		
		public static function findSkill(dir:int):int{
			var skill:int;
			switch(dir)
			{
				case Const.LEFT :
				case Const.RIGHT:
					skill = Const.SKILL1;
					break;
				case Const.TOP:
					skill = Const.SKILL2;
					break;
				case Const.BOTTOM:
					skill = Const.SKILL3;
					break;
				case Const.LEFT + Const.LEFT:
				case Const.RIGHT + Const.RIGHT:
					skill = Const.SKILL4;
					break;
				case Const.LEFT + Const.RIGHT:
					skill = Const.SKILL5;
					break;
				case Const.TOP + Const.TOP:
					skill = Const.SKILL6;
					break;
				case Const.BOTTOM + Const.BOTTOM:
					skill = Const.SKILL7;
					break;
				case Const.TOP + Const.RIGHT:
				case Const.TOP + Const.LEFT:
					skill = Const.SKILL8;
					break;
				case Const.BOTTOM + Const.RIGHT:
				case Const.BOTTOM + Const.LEFT:
					skill = Const.SKILL9;
					break;
				case Const.LEFT + Const.BOTTOM + Const.LEFT:
				case Const.RIGHT + Const.BOTTOM + Const.RIGHT:
					skill = Const.SKILL10;
					break;
				case Const.LEFT + Const.TOP + Const.LEFT:
				case Const.RIGHT + Const.TOP + Const.RIGHT:
					skill = Const.SKILL11;
					break;
				case Const.BOTTOM + Const.BOTTOM + Const.LEFT:
				case Const.BOTTOM + Const.BOTTOM + Const.RIGHT:
					skill = Const.SKILL12;
					break;
				case Const.TOP + Const.TOP + Const.LEFT:
				case Const.TOP + Const.TOP + Const.RIGHT:
					skill = Const.SKILL13;
					break;
				case Const.LEFT + Const.BOTTOM + Const.RIGHT:
					skill = Const.SKILL14;
					break;
				default:
					skill = Const.NONE;
					break;
			}
			return skill;
		}
	}
}